#ifndef __TASKLET_MGR_CENTER__
#define __TASKLET_MGR_CENTER__

#include <atomic>
#include <vector>
#include <iostream>
#include <memory>
#include <unordered_map>
#include "Tasklet.h"

using namespace std;
using ushort = unsigned short; 


class TaskletMgrCenter 
{
public:
    static TaskletMgrCenter* getInstance()
    {
        if(!m_pInstance)
        {
            m_pInstance = new TaskRootProgressMgrCenter();
        }
        
        return m_pInstance;
    }

public:
    TaskletMgrCenter() = default;
    ~TaskletMgrCenter(){}


private:
    unordered_map<ushort, shared_ptr<Tasklet>> m_waitingMap;

private:
    static TaskletMgrCenter* m_pInstance;
};

TaskletMgrCenter* TaskletMgrCenter::m_pInstance = nullptr;



#endif  //__TASK_PROGRESSMGR_CENTER__